This section does NOT provide a detailed explanation on how to program for the Macintosh. There are other (and better) sources for this type of information. What this section DOES provide is a suggested approach for learning how to start programming for the Macintosh (System 7) and what sort of tools and documentation you'll need based on personal experience.
Also provided is a sample System 7 application which can be used as a reference. Learning C or C++ is a fairly straightforward experience. Attempting the tackle graphical programming can be a much more daunting task.
You'd think that learning to program the Macintosh (or any graphical environment) would consist of buying one book, start at the beginning, and a few days later finish the book with a thorough knowledge of everything you needed to know. Well, it simply ain't so. There are literally volumes of reference material from Apple on all of the Managers which comprise the MacOS. Managers are groups of related functions. Examples of which are the QuickDraw Manager, TextEdit Manager, Menu Manager, etc. There are dozens of Managers and THOUSANDS of functions which comprise the Toolbox.
If your new to programming, learn C/C++ first. Don't worry about windows and graphical interfaces until you have a solid understanding of the core language. This means that you'll be stuck using text-based interfaces for awhile, but you'll be a lot less frustrated when it comes time to using pointers, handles, and data structures inherent with the MacOS.
PURCHASING A COMPILER
There are basically two choices for C/C++ compilers for the Macintosh; Symantec C++ and CodeWarrior by Metrowerks. Both are similarly priced and both are full-featured compilers. Symantec C++ has been around for longer, but Code Warrior is generally considered the platform of choice.
REFERENCE MATERIAL
The following is the minimum recommended reference material you should start out with if you intend on programming for the Macintosh (System 7):
There are currently over two dozen "Inside Macintosh" books available from Apple. You can easily order these books (as well as your compiler) through APDA (Apple Program Developers Association). APDA can be reached at 1-800-282-2732 or over the net at http://www.devcatalog.apple.com.
Most of documentation in the Inside Macintosh reference books uses Pascal programming conventions. This is a throwback to the programming language preference at the time the Mac was originally introduced. Expect major changes with the NeXT MacOS.
A COMPLETE SAMPLE APPLICATION
The following is a complete System 7 application. It represents watered-down code in that there is limited error-checking and no support for things like AppleEvents, Scripting, or Balloon Help. However, it does provide the basic event-loop which almost all Macintosh applications are based on.
The sample application consists of two files; starter.cp and resources.r